//
//	 ______    ______    ______    
//	/\  __ \  /\  ___\  /\  ___\   
//	\ \  __<  \ \  __\_ \ \  __\_ 
//	 \ \_____\ \ \_____\ \ \_____\ 
//	  \/_____/  \/_____/  \/_____/ 
//
//	Powered by BeeFramework
//
//
//  GoodsCell.m
//  Pizza
//
//  Created by sendInfo on 2015-03-26.
//  Copyright (c) 2015年 sendInfo. All rights reserved.
//

#import "GoodsCell.h"

#pragma mark -

@implementation GoodsCell

SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )

- (void)load
{
}

- (void)unload
{
}

- (void)dataDidChanged
{
    Goods *gd = self.data;
    $(@"goodname").DATA(gd.title);
    NSString *imgurl;
    if ([gd.pic hasPrefix:@"http"]) {
        imgurl = gd.pic;
    }else{
        imgurl = [NSString stringWithFormat:@"%@/%@",[HttpRequest sharedInstance].imageUrl,gd.pic];
    }
   
    $(@"photo").DATA(imgurl);
}

- (void)layoutDidFinish
{
    // TODO: custom layout here
}

@end
